Repetier-Firmware  1.0.0
Printer Class Reference

#include <Printer.h>

Static Public Member Functions

static void handleInterruptEvent ()
 
static INLINE void setInterruptEvent (uint8_t evt, bool highPriority)
 
static void reportPrinterMode ()
 
static INLINE void setMenuMode (uint16_t mode, bool on)
 
static INLINE bool isMenuMode (uint8_t mode)
 
static void setDebugLevel (uint8_t newLevel)
 
static void toggleEcho ()
 
static void toggleInfo ()
 
static void toggleErrors ()
 
static void toggleDryRun ()
 
static void toggleCommunication ()
 
static void toggleNoMoves ()
 
static void toggleEndStop ()
 
static INLINE uint8_t getDebugLevel ()
 
static INLINE bool debugEcho ()
 
static INLINE bool debugInfo ()
 
static INLINE bool debugErrors ()
 
static INLINE bool debugDryrun ()
 
static INLINE bool debugCommunication ()
 
static INLINE bool debugNoMoves ()
 
static INLINE bool debugEndStop ()
 
static INLINE bool debugFlag (uint8_t flags)
 
static INLINE void debugSet (uint8_t flags)
 
static INLINE void debugReset (uint8_t flags)
 
static void setFanSpeedDirectly (uint8_t speed)
 
static void setFan2SpeedDirectly (uint8_t speed)
 
static INLINE void disableXStepper ()
 Disable stepper motor for x direction. More...
 
static INLINE void disableYStepper ()
 Disable stepper motor for y direction. More...
 
static INLINE void disableZStepper ()
 Disable stepper motor for z direction. More...
 
static INLINE void enableXStepper ()
 Enable stepper motor for x direction. More...
 
static INLINE void enableYStepper ()
 Enable stepper motor for y direction. More...
 
static INLINE void enableZStepper ()
 Enable stepper motor for z direction. More...
 
static INLINE void setXDirection (bool positive)
 
static INLINE void setYDirection (bool positive)
 
static INLINE void setZDirection (bool positive)
 
static INLINE bool getZDirection ()
 
static INLINE bool getYDirection ()
 
static INLINE bool getXDirection ()
 
static INLINE uint8_t isLargeMachine ()
 
static INLINE void setLargeMachine (uint8_t b)
 
static INLINE uint8_t isAdvanceActivated ()
 
static INLINE void setAdvanceActivated (uint8_t b)
 
static INLINE uint8_t isHomedAll ()
 
static INLINE void unsetHomedAll ()
 
static INLINE void updateHomedAll ()
 
static INLINE uint8_t isXHomed ()
 
static INLINE void setXHomed (uint8_t b)
 
static INLINE uint8_t isYHomed ()
 
static INLINE void setYHomed (uint8_t b)
 
static INLINE uint8_t isZHomed ()
 
static INLINE void setZHomed (uint8_t b)
 
static INLINE uint8_t isAutoreportTemp ()
 
static INLINE void setAutoreportTemp (uint8_t b)
 
static INLINE uint8_t isAllKilled ()
 
static INLINE void setAllKilled (uint8_t b)
 
static INLINE uint8_t isAutomount ()
 
static INLINE void setAutomount (uint8_t b)
 
static INLINE uint8_t isAnimation ()
 
static INLINE void setAnimation (uint8_t b)
 
static INLINE uint8_t isUIErrorMessage ()
 
static INLINE void setUIErrorMessage (uint8_t b)
 
static INLINE uint8_t isNoDestinationCheck ()
 
static INLINE void setNoDestinationCheck (uint8_t b)
 
static INLINE uint8_t isPowerOn ()
 
static INLINE void setPowerOn (uint8_t b)
 
static INLINE uint8_t isColdExtrusionAllowed ()
 
static INLINE void setColdExtrusionAllowed (uint8_t b)
 
static INLINE uint8_t isBlockingReceive ()
 
static INLINE void setBlockingReceive (uint8_t b)
 
static INLINE uint8_t isAutoretract ()
 
static INLINE void setAutoretract (uint8_t b)
 
static INLINE uint8_t isPrinting ()
 
static INLINE void setPrinting (uint8_t b)
 
static INLINE uint8_t isStartStopSupported ()
 
static INLINE void setSupportStartStop (uint8_t b)
 
static INLINE uint8_t isDoorOpen ()
 
static bool updateDoorOpen ()
 
static INLINE uint8_t isHoming ()
 
static INLINE void setHoming (uint8_t b)
 
static INLINE uint8_t isAllEMotors ()
 
static INLINE void setAllEMotors (uint8_t b)
 
static INLINE uint8_t isDebugJam ()
 
static INLINE uint8_t isDebugJamOrDisabled ()
 
static INLINE void setDebugJam (uint8_t b)
 
static INLINE uint8_t isJamcontrolDisabled ()
 
static INLINE void setJamcontrolDisabled (uint8_t b)
 
static INLINE void toggleAnimation ()
 
static INLINE float convertToMM (float x)
 
static INLINE bool areAllSteppersDisabled ()
 
static INLINE void setAllSteppersDiabled ()
 
static INLINE void unsetAllSteppersDisabled ()
 
static INLINE bool isAnyTempsensorDefect ()
 
static INLINE void setAnyTempsensorDefect ()
 
static INLINE void unsetAnyTempsensorDefect ()
 
static INLINE bool isManualMoveMode ()
 
static INLINE void setManualMoveMode (bool on)
 
static INLINE bool isAutolevelActive ()
 
static void setAutolevelActive (bool on)
 Activate or deactivate rotation correction. More...
 
static INLINE void setZProbingActive (bool on)
 
static INLINE bool isZProbingActive ()
 
static INLINE void executeXYGantrySteps ()
 
static INLINE void executeXZGantrySteps ()
 
static INLINE void startXStep ()
 
static INLINE void startYStep ()
 
static INLINE void startZStep ()
 
static INLINE void endXYZSteps ()
 
static INLINE speed_t updateStepsPerTimerCall (speed_t vbase)
 
static INLINE void disableAllowedStepper ()
 
static INLINE float realXPosition ()
 
static INLINE float realYPosition ()
 
static INLINE float realZPosition ()
 
static INLINE void realPosition (float &xp, float &yp, float &zp)
 copies currentPosition to parameter. More...
 
static INLINE void insertStepperHighDelay ()
 
static void updateDerivedParameter ()
 
static void constrainDestinationCoords ()
 
static void updateCurrentPosition (bool copyLastCmd=false)
 
static void updateCurrentPositionSteps ()
 
static uint8_t setDestinationStepsFromGCode (GCode *com)
 Sets the destination coordinates to values stored in com. More...
 
static uint8_t moveTo (float x, float y, float z, float e, float f)
 Move to position without considering transformations. More...
 
static uint8_t moveToReal (float x, float y, float z, float e, float f, bool pathOptimize=true)
 Move to position considering transformations. More...
 
static void kill (uint8_t only_steppers)
 Stop heater and stepper motors. Disable power,if possible. More...
 
static void updateAdvanceFlags ()
 
static void setup ()
 
static void defaultLoopActions ()
 
static void homeAxis (bool xaxis, bool yaxis, bool zaxis)
 Main function for all homing operations. More...
 
static void setOrigin (float xOff, float yOff, float zOff)
 Home axis. More...
 
static bool isPositionAllowed (float x, float y, float z)
 Tests if the target position is allowed. More...
 
static INLINE int getFanSpeed ()
 
static INLINE int getFan2Speed ()
 
static INLINE void setDeltaPositions (long xaxis, long yaxis, long zaxis)
 
static void deltaMoveToTopEndstops (float feedrate)
 
static float runZMaxProbe ()
 
static bool startProbing (bool runScript, bool enforceStartHeight=true)
 Activate z-probe. More...
 
static void finishProbing ()
 Deactivate z-probe. More...
 
static float runZProbe (bool first, bool last, uint8_t repeat=Z_PROBE_REPETITIONS, bool runStartScript=true, bool enforceStartHeight=true)
 Measure distance to bottom at current position. More...
 
static void measureZProbeHeight (float curHeight)
 
static void waitForZProbeStart ()
 
static float bendingCorrectionAt (float x, float y)
 
static void transformToPrinter (float x, float y, float z, float &transX, float &transY, float &transZ)
 
static void transformFromPrinter (float x, float y, float z, float &transX, float &transY, float &transZ)
 
static void resetTransformationMatrix (bool silent)
 
static void buildTransformationMatrix (Plane &plane)
 
static void measureDistortion (void)
 
static void MemoryPosition ()
 
static void GoToMemoryPosition (bool x, bool y, bool z, bool e, float feed)
 
static void zBabystep ()
 Execute a open baby step. More...
 
static INLINE void resetWizardStack ()
 
static INLINE void pushWizardVar (wizardVar v)
 
static INLINE wizardVar popWizardVar ()
 
static void showConfiguration ()
 
static void setCaseLight (bool on)
 
static void reportCaseLightStatus ()
 
static void showJSONStatus (int type)
 
static void homeXAxis ()
 
static void homeYAxis ()
 
static void homeZAxis ()
 homes z axis. More...
 
static void pausePrint ()
 
static void continuePrint ()
 
static void stopPrint ()
 
static void prepareForProbing ()
 Prepares printer for probing commands. More...
 

Static Public Attributes

static volatile int extruderStepsNeeded
 This many extruder steps are still needed, <0 = reverse steps needed. More...
 
static ufast8_t maxExtruderSpeed
 Timer delay for end extruder speed. More...
 
static int advanceStepsSet
 
static long advanceExecuted
 Executed advance steps. More...
 
static uint16_t menuMode = 0
 
static float axisX1StepsPerMM
 
static float axisX2StepsPerMM
 
static float axisStepsPerMM [] = {XAXIS_STEPS_PER_MM, YAXIS_STEPS_PER_MM, ZAXIS_STEPS_PER_MM, 1}
 Resolution of each axis in steps per mm. More...
 
static float invAxisStepsPerMM []
 1/axisStepsPerMM for faster computation. More...
 
static float maxFeedrate [] = {MAX_FEEDRATE_X, MAX_FEEDRATE_Y, MAX_FEEDRATE_Z}
 Maximum feedrate in mm/s per axis. More...
 
static float homingFeedrate [] = {HOMING_FEEDRATE_X, HOMING_FEEDRATE_Y, HOMING_FEEDRATE_Z}
 
static uint32_t maxInterval
 
static float maxAccelerationMMPerSquareSecond [] = {MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X, MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y, MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z}
 X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts. More...
 
static float maxTravelAccelerationMMPerSquareSecond [] = {MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X, MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y, MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z}
 X, Y, Z max acceleration in mm/s^2 for travel moves. More...
 
static unsigned long maxPrintAccelerationStepsPerSquareSecond []
 
static unsigned long maxTravelAccelerationStepsPerSquareSecond []
 
static uint8_t relativeCoordinateMode = false
 Determines absolute (false) or relative Coordinates (true). More...
 
static uint8_t relativeExtruderCoordinateMode = false
 Determines Absolute or Relative E Codes while in Absolute Coordinates mode. E is always relative in Relative Coordinates mode. More...
 
static uint8_t unitIsInches = 0
 0 = Units are mm, 1 = units are inches. More...
 
static uint8_t mode = DEFAULT_PRINTER_MODE
 
static uint8_t fanSpeed = 0
 
static fast8_t stepsPerTimerCall = 1
 
static float zBedOffset = HAL::eprGetFloat(EPR_Z_PROBE_Z_OFFSET)
 
static uint8_t flag0 = 0
 
static uint8_t flag1 = 0
 
static uint8_t flag2 = 0
 
static uint8_t flag3 = 0
 
static uint32_t interval = 30000
 Last step duration in ticks. More...
 
static uint32_t timer
 used for acceleration/deceleration timing More...
 
static uint32_t stepNumber
 Step number in current move. More...
 
static float coordinateOffset [Z_AXIS_ARRAY] = {0, 0, 0}
 
static int32_t currentPositionSteps [E_AXIS_ARRAY]
 Position in steps from origin. More...
 
static float currentPosition [Z_AXIS_ARRAY]
 Position in global coordinates. More...
 
static float lastCmdPos [Z_AXIS_ARRAY]
 Last coordinates (global coordinates) send by g-codes. More...
 
static int32_t destinationSteps [E_AXIS_ARRAY]
 Target position in steps. More...
 
static millis_t lastTempReport = 0
 
static float extrudeMultiplyError = 0
 Accumulated error during extrusion. More...
 
static float extrusionFactor = 1.0
 Extrusion multiply factor. More...
 
static int32_t maxDeltaPositionSteps
 
static int32_t currentNonlinearPositionSteps [E_TOWER_ARRAY]
 
static floatLong deltaDiagonalStepsSquaredA
 
static floatLong deltaDiagonalStepsSquaredB
 
static floatLong deltaDiagonalStepsSquaredC
 
static float deltaMaxRadiusSquared
 
static int32_t deltaFloorSafetyMarginSteps
 
static int32_t deltaAPosXSteps
 
static int32_t deltaAPosYSteps
 
static int32_t deltaBPosXSteps
 
static int32_t deltaBPosYSteps
 
static int32_t deltaCPosXSteps
 
static int32_t deltaCPosYSteps
 
static int32_t realDeltaPositionSteps [TOWER_ARRAY]
 
static int16_t travelMovesPerSecond
 
static int16_t printMovesPerSecond
 
static float radius0
 
static int32_t xMinStepsAdj
 
static int32_t yMinStepsAdj
 
static int32_t zMinStepsAdj
 
static int32_t xMaxStepsAdj
 
static int32_t yMaxStepsAdj
 
static int32_t zMaxStepsAdj
 
static int32_t zCorrectionStepsIncluded = 0
 
static int32_t stepsRemainingAtZHit
 
static int32_t stepsRemainingAtXHit
 
static int32_t stepsRemainingAtYHit
 
static int32_t levelingP1 [3]
 
static int32_t levelingP2 [3]
 
static int32_t levelingP3 [3]
 
static float autolevelTransformation [9]
 Transformation matrix. More...
 
static float thermoMinTemp
 
static float thermoMaxTemp
 
static bool sledParked
 
static int16_t zBabystepsMissing
 
static int16_t zBabysteps
 
static int32_t xMaxSteps
 For software endstops, limit of move in positive direction. More...
 
static int32_t yMaxSteps
 For software endstops, limit of move in positive direction. More...
 
static int32_t zMaxSteps
 For software endstops, limit of move in positive direction. More...
 
static int32_t xMinSteps
 For software endstops, limit of move in negative direction. More...
 
static int32_t yMinSteps
 For software endstops, limit of move in negative direction. More...
 
static int32_t zMinSteps
 For software endstops, limit of move in negative direction. More...
 
static float xLength
 
static float xMin
 
static float yLength
 
static float yMin
 
static float zLength
 
static float zMin
 
static float feedrate
 Last requested feedrate. More...
 
static int feedrateMultiply
 Multiplier for feedrate in percent (factor 1 = 100) More...
 
static unsigned int extrudeMultiply
 Flow multiplier in percent (factor 1 = 100) More...
 
static float maxJerk
 Maximum allowed jerk in mm/s. More...
 
static uint8_t interruptEvent = 0
 Event generated in interrupts that should/could be handled in main thread. More...
 
static float maxZJerk
 Maximum allowed jerk in z direction in mm/s. More...
 
static float offsetX
 X-offset for different tool positions. More...
 
static float offsetY
 Y-offset for different tool positions. More...
 
static float offsetZ
 Z-offset for different tool positions. More...
 
static float offsetZ2 = 0
 Z-offset without rotation correction. Required for z probe corrections. More...
 
static speed_t vMaxReached
 Maximum reached speed. More...
 
static uint32_t msecondsPrinting
 Milliseconds of printing time (means time with heated extruder) More...
 
static float filamentPrinted
 mm of filament printed since counting started More...
 
static float backlashX
 
static float backlashY
 
static float backlashZ
 
static uint8_t backlashDir
 
static fast8_t multiZHomeFlags
 
static float memoryX = IGNORE_COORDINATE
 
static float memoryY = IGNORE_COORDINATE
 
static float memoryZ = IGNORE_COORDINATE
 
static float memoryE = IGNORE_COORDINATE
 
static float memoryF = -1
 
static int8_t motorX
 
static int8_t motorYorZ
 
static int currentLayer = 0
 
static int maxLayer = -1
 
static char printName [21] = ""
 
static float progress = 0
 
static fast8_t wizardStackPos
 
static wizardVar wizardStack [WIZARD_STACK_SIZE]
 
static Distortion distortion
 

Static Private Attributes

static uint8_t debugLevel = 6
 Bitfield defining debug output. 1 = echo, 2 = info, 4 = error, 8 = dry run., 16 = Only communication, 32 = No moves. More...
 

Detailed Description

The Printer class is the main class for the control of the 3d printer. Here all movement related key variables are stored like positions, accelerations.

Coordinates

The firmware works with 4 different coordinate systems and understanding the dependencies between them is crucial to a good understanding on how positions are handled.

Real world floating coordinates (RWC)

These coordinates are the real floating positions with any offsets subtracted, which might be set with G92. This is used to show coordinates or for computations based on real positions. Any correction coming from rotation or distortion is not included in these coordinates. currentPosition and lastCmdPos use this coordinate system.

When these coordinates need to be used for computation, the value of offsetX, offsetY and offsetZ is always added. These are the offsets of the currently active tool to virtual tool center (normally first extruder).

Rotated floating coordinates (ROTC)

If auto leveling is active, printing to the official coordinates is not possible. We have to assume that the bed is somehow rotated against the Cartesian mechanics from the printer. Applying transformToPrinter to the real world coordinates, rotates them around the origin to be equal to the rotated bed. transformFromPrinter would apply the opposite transformation.

Cartesian motor position coordinates (CMC)

The position of motors is stored as steps from 0. The reason for this is that it is crucial that no rounding errors ever cause addition of any steps. These positions are simply computed by multiplying the ROTC coordinates with the axisStepsPerMM.

If distortion correction is enabled, there is an additional factor for the z position that gets added: zCorrectionStepsIncluded This value is recalculated by every move added to reflect the distortion at any given xyz position.

Nonlinear motor position coordinates (NMC)

In case of a nonlinear mechanic like a delta printer, the CMC does not define the motor positions. An additional transformation converts the CMC coordinates into NMC.

Transformations from RWC to CMC

Given:

  • Target position for tool: x_rwc, y_rwc, z_rwc
  • Tool offsets: offsetX, offsetY, offsetZ
  • Offset from bed leveling: offsetZ2

Step 1: Convert to ROTC

transformToPrinter(x_rwc + Printer::offsetX, y_rwc + Printer::offsetY, z_rwc +  Printer::offsetZ, x_rotc, y_rotc, z_rotc);
z_rotc += offsetZ2

Step 2: Compute CMC

x_cmc = static_cast<int32_t>(floor(x_rotc * axisStepsPerMM[X_AXIS] + 0.5f));
y_cmc = static_cast<int32_t>(floor(y_rotc * axisStepsPerMM[Y_AXIS] + 0.5f));
z_cmc = static_cast<int32_t>(floor(z_rotc * axisStepsPerMM[Z_AXIS] + 0.5f));

Transformation from CMC to RWC

Note: zCorrectionStepsIncluded comes from distortion correction and gets set when a move is queued by the queuing function. Therefore it is not visible in the inverse transformation above. When transforming back, consider if the value was set or not!

Step 1: Convert to ROTC

x_rotc = static_cast<float>(x_cmc) * invAxisStepsPerMM[X_AXIS];
y_rotc = static_cast<float>(y_cmc) * invAxisStepsPerMM[Y_AXIS];
#if NONLINEAR_SYSTEM
z_rotc = static_cast<float>(z_cmc * invAxisStepsPerMM[Z_AXIS] - offsetZ2;
#else
z_rotc = static_cast<float>(z_cmc - zCorrectionStepsIncluded) * invAxisStepsPerMM[Z_AXIS] - offsetZ2;
#endif

Step 2: Convert to RWC

transformFromPrinter(x_rotc, y_rotc, z_rotc,x_rwc, y_rwc, z_rwc);
x_rwc -= Printer::offsetX; // Offset from active extruder or z probe
y_rwc -= Printer::offsetY;
z_rwc -= Printer::offsetZ;

Member Function Documentation

◆ areAllSteppersDisabled()

static INLINE bool Printer::areAllSteppersDisabled ( )
inlinestatic

◆ bendingCorrectionAt()

float Printer::bendingCorrectionAt ( float  x,
float  y 
)
static

◆ buildTransformationMatrix()

static void Printer::buildTransformationMatrix ( Plane &  plane)
static

◆ constrainDestinationCoords()

void Printer::constrainDestinationCoords ( )
static

If we are not homing or destination check being disabled, this will reduce destinationSteps to a valid value. In other words this works as software endstop.

◆ continuePrint()

void Printer::continuePrint ( )
static

◆ convertToMM()

static INLINE float Printer::convertToMM ( float  x)
inlinestatic

◆ debugCommunication()

static INLINE bool Printer::debugCommunication ( )
inlinestatic

◆ debugDryrun()

static INLINE bool Printer::debugDryrun ( )
inlinestatic

◆ debugEcho()

static INLINE bool Printer::debugEcho ( )
inlinestatic

◆ debugEndStop()

static INLINE bool Printer::debugEndStop ( )
inlinestatic

◆ debugErrors()

static INLINE bool Printer::debugErrors ( )
inlinestatic

◆ debugFlag()

static INLINE bool Printer::debugFlag ( uint8_t  flags)
inlinestatic

◆ debugInfo()

static INLINE bool Printer::debugInfo ( )
inlinestatic

◆ debugNoMoves()

static INLINE bool Printer::debugNoMoves ( )
inlinestatic

◆ debugReset()

static INLINE void Printer::debugReset ( uint8_t  flags)
inlinestatic

◆ debugSet()

static INLINE void Printer::debugSet ( uint8_t  flags)
inlinestatic

◆ defaultLoopActions()

void Printer::defaultLoopActions ( )
static

◆ deltaMoveToTopEndstops()

static void Printer::deltaMoveToTopEndstops ( float  feedrate)
static

◆ disableAllowedStepper()

static INLINE void Printer::disableAllowedStepper ( )
inlinestatic

◆ disableXStepper()

static INLINE void Printer::disableXStepper ( )
inlinestatic

Disable stepper motor for x direction.

◆ disableYStepper()

static INLINE void Printer::disableYStepper ( )
inlinestatic

Disable stepper motor for y direction.

◆ disableZStepper()

static INLINE void Printer::disableZStepper ( )
inlinestatic

Disable stepper motor for z direction.

◆ enableXStepper()

static INLINE void Printer::enableXStepper ( )
inlinestatic

Enable stepper motor for x direction.

◆ enableYStepper()

static INLINE void Printer::enableYStepper ( )
inlinestatic

Enable stepper motor for y direction.

◆ enableZStepper()

static INLINE void Printer::enableZStepper ( )
inlinestatic

Enable stepper motor for z direction.

◆ endXYZSteps()

static INLINE void Printer::endXYZSteps ( )
inlinestatic

◆ executeXYGantrySteps()

static INLINE void Printer::executeXYGantrySteps ( )
inlinestatic

◆ executeXZGantrySteps()

static INLINE void Printer::executeXZGantrySteps ( )
inlinestatic

◆ finishProbing()

void Printer::finishProbing ( )
static

Deactivate z-probe.

◆ getDebugLevel()

static INLINE uint8_t Printer::getDebugLevel ( )
inlinestatic

◆ getFan2Speed()

static INLINE int Printer::getFan2Speed ( )
inlinestatic

◆ getFanSpeed()

static INLINE int Printer::getFanSpeed ( )
inlinestatic

◆ getXDirection()

static INLINE bool Printer::getXDirection ( )
inlinestatic

◆ getYDirection()

static INLINE bool Printer::getYDirection ( )
inlinestatic

◆ getZDirection()

static INLINE bool Printer::getZDirection ( )
inlinestatic

◆ GoToMemoryPosition()

void Printer::GoToMemoryPosition ( bool  x,
bool  y,
bool  z,
bool  e,
float  feed 
)
static

◆ handleInterruptEvent()

void Printer::handleInterruptEvent ( )
static

◆ homeAxis()

void Printer::homeAxis ( bool  xaxis,
bool  yaxis,
bool  zaxis 
)
static

Main function for all homing operations.

For homing operations only this function should be used. It calls Printer::homeXAxis, Printer::homeYAxis and Printer::homeZAxis after doing some initialization work. The order of operation and some extra functions are controlled by HOMING_ORDER.

Parameters
xaxisTrue if homing of x axis is wanted.
yaxisTrue if homing of y axis is wanted.
zaxisTrue if homing of z axis is wanted.

◆ homeXAxis()

void Printer::homeXAxis ( )
static

◆ homeYAxis()

void Printer::homeYAxis ( )
static

◆ homeZAxis()

void Printer::homeZAxis ( )
static

homes z axis.

Homing z axis is the most complicated homing part as it needs to correct for several parameters depending on rotation correction, distortion correction, position, homing direction, sensor type and bed coating. Because we get lots of support questions from "wrong" behavior due to misunderstandings of all these dependencies, I will try to describe the function as detailed as possible.

Step 1: Test if homing is possible at all

Test if homing in Z_HOME_DIR has a matching hardware endstop. If not, no z homing is possible at all.

Step 2: Activate z-probe if required

If homing to z min using a z-probe, activate the probe. Requires a position where this is possible, since probe offset could prevent the move. Hence in this case x and y must be homed first and a z homing position given and reached before calling this function.

Step 3: Fast homing to sensor

A move of 2 * z_length is send to printer. The move will stop when the endstop triggers.

Step 4: Untrigger sensor

Move in opposite direction ENDSTOP_Z_BACK_MOVE mm to disable the endstop signal safely.

Step 5: Retest endstop slowly

For best precision we rerun step 3 with 1/ENDSTOP_Z_RETEST_REDUCTION_FACTOR factor for speed. This should give a very accurate trigge rposition.

Step 6: Deactivate z-probe if it was activated in step 2

Step 7: Correct Z position

zCorrection sums up several influences:

  • -axisStepsPerMM[Z_AXIS] * EEPROM::zProbeHeight() to compensate for z-prove trigger offset if probe was used.
  • -axisStepsPerMM[Z_AXIS] * ENDSTOP_Z_BACK_ON_HOME * Z_HOME_DIR to add wanted extra distance ENDSTOP_Z_BACK_ON_HOME.
  • axisStepsPerMM[Z_AXIS] * zBedOffset to correct for bed coating if correction mode Z_PROBE_Z_OFFSET_MODE == 0 and z min homing. and moves the z axis up that distance.

Step 8: Set position in CMC

For z min homing set currentPositionSteps[Z_AXIS] to zMinSteps. For z max homing set it to zMaxSteps - bed coating.

Set z offset according to selected tool z offset, if extruder is not sensor.

If distortion correction is enabled, set zCorrectionStepsIncluded and add value to currentPositionSteps.

#step 9: Compute RWC and correct rotation influence

Compute real position from position in steps. If rotation is on we did measure with a z-probe, this result is wrong and we need to correct by the z change between origin and current position.

currentPositionSteps[Z_AXIS] -= (axisStepsPerMM[Z_AXIS] * currentPosition[Z_AXIS] - zMinSteps);
currentPosition[Z_AXIS] = zMin;

Step 10: Update NMC for nonlinear systems

Step 11: Set babysteps to 0

◆ insertStepperHighDelay()

static INLINE void Printer::insertStepperHighDelay ( )
inlinestatic

◆ isAdvanceActivated()

static INLINE uint8_t Printer::isAdvanceActivated ( )
inlinestatic

◆ isAllEMotors()

static INLINE uint8_t Printer::isAllEMotors ( )
inlinestatic

◆ isAllKilled()

static INLINE uint8_t Printer::isAllKilled ( )
inlinestatic

◆ isAnimation()

static INLINE uint8_t Printer::isAnimation ( )
inlinestatic

◆ isAnyTempsensorDefect()

static INLINE bool Printer::isAnyTempsensorDefect ( )
inlinestatic

◆ isAutolevelActive()

static INLINE bool Printer::isAutolevelActive ( )
inlinestatic

◆ isAutomount()

static INLINE uint8_t Printer::isAutomount ( )
inlinestatic

◆ isAutoreportTemp()

static INLINE uint8_t Printer::isAutoreportTemp ( )
inlinestatic

◆ isAutoretract()

static INLINE uint8_t Printer::isAutoretract ( )
inlinestatic

◆ isBlockingReceive()

static INLINE uint8_t Printer::isBlockingReceive ( )
inlinestatic

◆ isColdExtrusionAllowed()

static INLINE uint8_t Printer::isColdExtrusionAllowed ( )
inlinestatic

◆ isDebugJam()

static INLINE uint8_t Printer::isDebugJam ( )
inlinestatic

◆ isDebugJamOrDisabled()

static INLINE uint8_t Printer::isDebugJamOrDisabled ( )
inlinestatic

◆ isDoorOpen()

static INLINE uint8_t Printer::isDoorOpen ( )
inlinestatic

◆ isHomedAll()

static INLINE uint8_t Printer::isHomedAll ( )
inlinestatic

◆ isHoming()

static INLINE uint8_t Printer::isHoming ( )
inlinestatic

◆ isJamcontrolDisabled()

static INLINE uint8_t Printer::isJamcontrolDisabled ( )
inlinestatic

◆ isLargeMachine()

static INLINE uint8_t Printer::isLargeMachine ( )
inlinestatic

For large machines, the nonlinear transformation can exceed integer 32bit range, so floating point math is needed.

◆ isManualMoveMode()

static INLINE bool Printer::isManualMoveMode ( )
inlinestatic

◆ isMenuMode()

static INLINE bool Printer::isMenuMode ( uint8_t  mode)
inlinestatic

◆ isNoDestinationCheck()

static INLINE uint8_t Printer::isNoDestinationCheck ( )
inlinestatic

◆ isPositionAllowed()

bool Printer::isPositionAllowed ( float  x,
float  y,
float  z 
)
static

Tests if the target position is allowed.

Tests if the test position lies inside the defined geometry. For Cartesian printers this is the defined cube defined by x,y,z min and length. For delta printers the cylindrical shape is tested.

Parameters
xX position in mm.
xY position in mm.
xZ position in mm.
Returns
true if position is valid and can be reached.

◆ isPowerOn()

static INLINE uint8_t Printer::isPowerOn ( )
inlinestatic

◆ isPrinting()

static INLINE uint8_t Printer::isPrinting ( )
inlinestatic

◆ isStartStopSupported()

static INLINE uint8_t Printer::isStartStopSupported ( )
inlinestatic

◆ isUIErrorMessage()

static INLINE uint8_t Printer::isUIErrorMessage ( )
inlinestatic

◆ isXHomed()

static INLINE uint8_t Printer::isXHomed ( )
inlinestatic

◆ isYHomed()

static INLINE uint8_t Printer::isYHomed ( )
inlinestatic

◆ isZHomed()

static INLINE uint8_t Printer::isZHomed ( )
inlinestatic

◆ isZProbingActive()

static INLINE bool Printer::isZProbingActive ( )
inlinestatic

◆ kill()

void Printer::kill ( uint8_t  only_steppers)
static

Stop heater and stepper motors. Disable power,if possible.

◆ measureDistortion()

void Printer::measureDistortion ( void  )
static

◆ measureZProbeHeight()

void Printer::measureZProbeHeight ( float  curHeight)
static

Having printer's height set properly (i.e. after calibration of Z=0), one can use this procedure to measure Z-probe height. It deploys the sensor, takes several probes at center, then updates Z-probe height with average.

◆ MemoryPosition()

void Printer::MemoryPosition ( )
static

◆ moveTo()

uint8_t Printer::moveTo ( float  x,
float  y,
float  z,
float  e,
float  f 
)
static

Move to position without considering transformations.

Computes the destinationSteps without rotating but including active offsets! The coordinates are in printer coordinates with no G92 offset.

Parameters
xTarget x coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget y coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget z coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget e coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget f feedrate or IGNORE_COORDINATE if it should use latest feedrate.
Returns
true if queuing was successful.

◆ moveToReal()

uint8_t Printer::moveToReal ( float  x,
float  y,
float  z,
float  e,
float  f,
bool  pathOptimize = true 
)
static

Move to position considering transformations.

Computes the destinationSteps including rotating and active offsets. The coordinates are in printer coordinates with no G92 offset.

Parameters
xTarget x coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget y coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget z coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget e coordinate or IGNORE_COORDINATE if it should be ignored.
xTarget f feedrate or IGNORE_COORDINATE if it should use latest feedrate.
pathOptimizetrue if path planner should include it in calculation, otherwise default start/end speed is enforced.
Returns
true if queuing was successful.

◆ pausePrint()

void Printer::pausePrint ( )
static

◆ popWizardVar()

static INLINE wizardVar Printer::popWizardVar ( )
inlinestatic

◆ prepareForProbing()

void Printer::prepareForProbing ( )
static

Prepares printer for probing commands.

Probing can not start under all conditions. This command therefore makes sure, a probing command can be executed by:

  • Ensuring all axes are homed.
  • Going to a low z position for fast measuring.
  • Go to a position, where enabling the z-probe is possible without leaving the valid print area.

◆ pushWizardVar()

static INLINE void Printer::pushWizardVar ( wizardVar  v)
inlinestatic

◆ realPosition()

static INLINE void Printer::realPosition ( float &  xp,
float &  yp,
float &  zp 
)
inlinestatic

copies currentPosition to parameter.

◆ realXPosition()

static INLINE float Printer::realXPosition ( )
inlinestatic

◆ realYPosition()

static INLINE float Printer::realYPosition ( )
inlinestatic

◆ realZPosition()

static INLINE float Printer::realZPosition ( )
inlinestatic

◆ reportCaseLightStatus()

void Printer::reportCaseLightStatus ( )
static

◆ reportPrinterMode()

void Printer::reportPrinterMode ( )
static

◆ resetTransformationMatrix()

static void Printer::resetTransformationMatrix ( bool  silent)
static

◆ resetWizardStack()

static INLINE void Printer::resetWizardStack ( )
inlinestatic

◆ runZMaxProbe()

static float Printer::runZMaxProbe ( )
static

◆ runZProbe()

float Printer::runZProbe ( bool  first,
bool  last,
uint8_t  repeat = Z_PROBE_REPETITIONS,
bool  runStartScript = true,
bool  enforceStartHeight = true 
)
static

Measure distance to bottom at current position.

This is the most important function for bed leveling. It does

  1. Run probe start script if first = true and runStartScript = true
  2. Position zProbe at current position if first = true. If we are more then maxStartHeight away from bed we also go down to that distance.
  3. Measure the the steps until probe hits the bed.
  4. Undo positioning to z probe and run finish script if last = true.

Now we compute the nozzle height as follows: a) Compute average height from repeated measurements b) Add zProbeHeight to correct difference between triggering point and nozzle height above bed c) If Z_PROBE_Z_OFFSET_MODE == 1 we add zProbeZOffset() that is coating thickness if we measure below coating with indictive sensor. d) Add distortion correction. e) Add bending correction

Then we return the measured and corrected z distance.

Parameters
firstIf true, Printer::startProbing is called.
lastIf true, Printer::finishProbing is called at the end.
repeatNumber of repetitions to average measurement errors.
runStartScriptIf true tells startProbing to run start script.
enforceStartHeightTells start script to enforce a maximum distance to bed.
Returns
ILLEGAL_Z_PROBE on errors or measured distance.

◆ setAdvanceActivated()

static INLINE void Printer::setAdvanceActivated ( uint8_t  b)
inlinestatic

◆ setAllEMotors()

static INLINE void Printer::setAllEMotors ( uint8_t  b)
inlinestatic

◆ setAllKilled()

static INLINE void Printer::setAllKilled ( uint8_t  b)
inlinestatic

◆ setAllSteppersDiabled()

static INLINE void Printer::setAllSteppersDiabled ( )
inlinestatic

◆ setAnimation()

static INLINE void Printer::setAnimation ( uint8_t  b)
inlinestatic

◆ setAnyTempsensorDefect()

static INLINE void Printer::setAnyTempsensorDefect ( )
inlinestatic

◆ setAutolevelActive()

void Printer::setAutolevelActive ( bool  on)
static

Activate or deactivate rotation correction.

Parameters
onTrue if Rotation correction should be enabled.

◆ setAutomount()

static INLINE void Printer::setAutomount ( uint8_t  b)
inlinestatic

◆ setAutoreportTemp()

static INLINE void Printer::setAutoreportTemp ( uint8_t  b)
inlinestatic

◆ setAutoretract()

static INLINE void Printer::setAutoretract ( uint8_t  b)
inlinestatic

◆ setBlockingReceive()

static INLINE void Printer::setBlockingReceive ( uint8_t  b)
inlinestatic

◆ setCaseLight()

void Printer::setCaseLight ( bool  on)
static

◆ setColdExtrusionAllowed()

static INLINE void Printer::setColdExtrusionAllowed ( uint8_t  b)
inlinestatic

◆ setDebugJam()

static INLINE void Printer::setDebugJam ( uint8_t  b)
inlinestatic

◆ setDebugLevel()

void Printer::setDebugLevel ( uint8_t  newLevel)
static

◆ setDeltaPositions()

static INLINE void Printer::setDeltaPositions ( long  xaxis,
long  yaxis,
long  zaxis 
)
inlinestatic

◆ setDestinationStepsFromGCode()

uint8_t Printer::setDestinationStepsFromGCode ( GCode *  com)
static

Sets the destination coordinates to values stored in com.

Extracts x,y,z,e,f from g-code considering active units. Converted result is stored in currentPosition and lastCmdPos. Converts position to destinationSteps including rotation and offsets, excluding distortion correction (which gets added on move queuing).

Parameters
comg-code with new destination position.
Returns
true if it is a move, false if no move results from coordinates.

◆ setFan2SpeedDirectly()

void Printer::setFan2SpeedDirectly ( uint8_t  speed)
static

Sets the pwm for the fan 2 speed. Gets called by motion control or Commands::setFan2Speed.

◆ setFanSpeedDirectly()

void Printer::setFanSpeedDirectly ( uint8_t  speed)
static

Sets the pwm for the fan speed. Gets called by motion control or Commands::setFanSpeed.

◆ setHoming()

static INLINE void Printer::setHoming ( uint8_t  b)
inlinestatic

◆ setInterruptEvent()

static INLINE void Printer::setInterruptEvent ( uint8_t  evt,
bool  highPriority 
)
inlinestatic

◆ setJamcontrolDisabled()

static INLINE void Printer::setJamcontrolDisabled ( uint8_t  b)
inlinestatic

◆ setLargeMachine()

static INLINE void Printer::setLargeMachine ( uint8_t  b)
inlinestatic

◆ setManualMoveMode()

static INLINE void Printer::setManualMoveMode ( bool  on)
inlinestatic

◆ setMenuMode()

static INLINE void Printer::setMenuMode ( uint16_t  mode,
bool  on 
)
inlinestatic

◆ setNoDestinationCheck()

static INLINE void Printer::setNoDestinationCheck ( uint8_t  b)
inlinestatic

◆ setOrigin()

void Printer::setOrigin ( float  xOff,
float  yOff,
float  zOff 
)
static

Home axis.

◆ setPowerOn()

static INLINE void Printer::setPowerOn ( uint8_t  b)
inlinestatic

◆ setPrinting()

static INLINE void Printer::setPrinting ( uint8_t  b)
inlinestatic

◆ setSupportStartStop()

static INLINE void Printer::setSupportStartStop ( uint8_t  b)
inlinestatic

◆ setUIErrorMessage()

static INLINE void Printer::setUIErrorMessage ( uint8_t  b)
inlinestatic

◆ setup()

void Printer::setup ( )
static

< Current feedrate in mm/s.

◆ setXDirection()

static INLINE void Printer::setXDirection ( bool  positive)
inlinestatic

◆ setXHomed()

static INLINE void Printer::setXHomed ( uint8_t  b)
inlinestatic

◆ setYDirection()

static INLINE void Printer::setYDirection ( bool  positive)
inlinestatic

◆ setYHomed()

static INLINE void Printer::setYHomed ( uint8_t  b)
inlinestatic

◆ setZDirection()

static INLINE void Printer::setZDirection ( bool  positive)
inlinestatic

◆ setZHomed()

static INLINE void Printer::setZHomed ( uint8_t  b)
inlinestatic

◆ setZProbingActive()

static INLINE void Printer::setZProbingActive ( bool  on)
inlinestatic

◆ showConfiguration()

void Printer::showConfiguration ( )
static

◆ showJSONStatus()

static void Printer::showJSONStatus ( int  type)
static

◆ startProbing()

bool Printer::startProbing ( bool  runScript,
bool  enforceStartHeight = true 
)
static

Activate z-probe.

Tests if switching from active tool to z-probe is possible at current position. If not the operation is aborted. If ok, it runs start script, checks z position and applies the z-probe offset.

Parameters
runScriptRun start z-probe script from configuration.
enforceStartHeightIf true moves z to EEPROM::zProbeBedDistance() + (EEPROM::zProbeHeight() > 0 ? EEPROM::zProbeHeight() : 0) + 0.1 if current position is higher.
Returns
True if activation was successful.

◆ startXStep()

static INLINE void Printer::startXStep ( )
inlinestatic

◆ startYStep()

static INLINE void Printer::startYStep ( )
inlinestatic

◆ startZStep()

static INLINE void Printer::startZStep ( )
inlinestatic

◆ stopPrint()

void Printer::stopPrint ( )
static

◆ toggleAnimation()

static INLINE void Printer::toggleAnimation ( )
inlinestatic

◆ toggleCommunication()

void Printer::toggleCommunication ( )
static

◆ toggleDryRun()

void Printer::toggleDryRun ( )
static

◆ toggleEcho()

void Printer::toggleEcho ( )
static

◆ toggleEndStop()

void Printer::toggleEndStop ( )
static

◆ toggleErrors()

void Printer::toggleErrors ( )
static

◆ toggleInfo()

void Printer::toggleInfo ( )
static

◆ toggleNoMoves()

void Printer::toggleNoMoves ( )
static

◆ transformFromPrinter()

void Printer::transformFromPrinter ( float  x,
float  y,
float  z,
float &  transX,
float &  transY,
float &  transZ 
)
static

◆ transformToPrinter()

void Printer::transformToPrinter ( float  x,
float  y,
float  z,
float &  transX,
float &  transY,
float &  transZ 
)
static

◆ unsetAllSteppersDisabled()

static INLINE void Printer::unsetAllSteppersDisabled ( )
inlinestatic

◆ unsetAnyTempsensorDefect()

static INLINE void Printer::unsetAnyTempsensorDefect ( )
inlinestatic

◆ unsetHomedAll()

static INLINE void Printer::unsetHomedAll ( )
inlinestatic

◆ updateAdvanceFlags()

void Printer::updateAdvanceFlags ( )
static

◆ updateCurrentPosition()

void Printer::updateCurrentPosition ( bool  copyLastCmd = false)
static

Computes currentposition from currentPositionSteps considering all active transformations. If the copyLastCmd flag is true, the result is also copied to lastCmdPos .

Computes currentPosition from currentPositionSteps including correction for offset.

◆ updateCurrentPositionSteps()

void Printer::updateCurrentPositionSteps ( )
static

◆ updateDerivedParameter()

void Printer::updateDerivedParameter ( )
static

Acceleration in steps/s^3 in printing mode.

Acceleration in steps/s^2 in movement mode.

◆ updateDoorOpen()

bool Printer::updateDoorOpen ( )
static

◆ updateHomedAll()

static INLINE void Printer::updateHomedAll ( )
inlinestatic

◆ updateStepsPerTimerCall()

static INLINE speed_t Printer::updateStepsPerTimerCall ( speed_t  vbase)
inlinestatic

◆ waitForZProbeStart()

void Printer::waitForZProbeStart ( )
static

◆ zBabystep()

void Printer::zBabystep ( )
static

Execute a open baby step.

If zBabystepsMissing is not 0 this will do a z step in the desired direction. The old movement directions get restored after execution.

Member Data Documentation

◆ advanceExecuted

long Printer::advanceExecuted
static

Executed advance steps.

◆ advanceStepsSet

int Printer::advanceStepsSet
static

◆ autolevelTransformation

float Printer::autolevelTransformation[9]
static

Transformation matrix.

◆ axisStepsPerMM

float Printer::axisStepsPerMM = {XAXIS_STEPS_PER_MM, YAXIS_STEPS_PER_MM, ZAXIS_STEPS_PER_MM, 1}
static

Resolution of each axis in steps per mm.

Number of steps per mm needed.

◆ axisX1StepsPerMM

float Printer::axisX1StepsPerMM
static

◆ axisX2StepsPerMM

float Printer::axisX2StepsPerMM
static

◆ backlashDir

uint8_t Printer::backlashDir
static

◆ backlashX

float Printer::backlashX
static

◆ backlashY

float Printer::backlashY
static

◆ backlashZ

float Printer::backlashZ
static

◆ coordinateOffset

float Printer::coordinateOffset = {0, 0, 0}
static

◆ currentLayer

int Printer::currentLayer = 0
static

◆ currentNonlinearPositionSteps

int32_t Printer::currentNonlinearPositionSteps[E_TOWER_ARRAY]
static

◆ currentPosition

float Printer::currentPosition
static

Position in global coordinates.

◆ currentPositionSteps

long Printer::currentPositionSteps
static

Position in steps from origin.

◆ debugLevel

uint8_t Printer::debugLevel = 6
staticprivate

Bitfield defining debug output. 1 = echo, 2 = info, 4 = error, 8 = dry run., 16 = Only communication, 32 = No moves.

◆ deltaAPosXSteps

int32_t Printer::deltaAPosXSteps
static

◆ deltaAPosYSteps

int32_t Printer::deltaAPosYSteps
static

◆ deltaBPosXSteps

int32_t Printer::deltaBPosXSteps
static

◆ deltaBPosYSteps

int32_t Printer::deltaBPosYSteps
static

◆ deltaCPosXSteps

int32_t Printer::deltaCPosXSteps
static

◆ deltaCPosYSteps

int32_t Printer::deltaCPosYSteps
static

◆ deltaDiagonalStepsSquaredA

floatLong Printer::deltaDiagonalStepsSquaredA
static

◆ deltaDiagonalStepsSquaredB

floatLong Printer::deltaDiagonalStepsSquaredB
static

◆ deltaDiagonalStepsSquaredC

floatLong Printer::deltaDiagonalStepsSquaredC
static

◆ deltaFloorSafetyMarginSteps

int32_t Printer::deltaFloorSafetyMarginSteps
static

◆ deltaMaxRadiusSquared

float Printer::deltaMaxRadiusSquared
static

◆ destinationSteps

long Printer::destinationSteps
static

Target position in steps.

◆ distortion

Distortion Printer::distortion
static

◆ extrudeMultiply

unsigned int Printer::extrudeMultiply
static

Flow multiplier in percent (factor 1 = 100)

◆ extrudeMultiplyError

float Printer::extrudeMultiplyError = 0
static

Accumulated error during extrusion.

◆ extruderStepsNeeded

volatile int Printer::extruderStepsNeeded
static

This many extruder steps are still needed, <0 = reverse steps needed.

◆ extrusionFactor

float Printer::extrusionFactor = 1.0
static

Extrusion multiply factor.

◆ fanSpeed

uint8_t Printer::fanSpeed = 0
static

◆ feedrate

float Printer::feedrate
static

Last requested feedrate.

◆ feedrateMultiply

int Printer::feedrateMultiply
static

Multiplier for feedrate in percent (factor 1 = 100)

◆ filamentPrinted

float Printer::filamentPrinted
static

mm of filament printed since counting started

◆ flag0

uint8_t Printer::flag0 = 0
static

◆ flag1

uint8_t Printer::flag1 = 0
static

◆ flag2

uint8_t Printer::flag2 = 0
static

◆ flag3

uint8_t Printer::flag3 = 0
static

◆ homingFeedrate

float Printer::homingFeedrate = {HOMING_FEEDRATE_X, HOMING_FEEDRATE_Y, HOMING_FEEDRATE_Z}
static

◆ interruptEvent

uint8_t Printer::interruptEvent = 0
static

Event generated in interrupts that should/could be handled in main thread.

◆ interval

uint32_t Printer::interval = 30000
static

Last step duration in ticks.

◆ invAxisStepsPerMM

float Printer::invAxisStepsPerMM
static

1/axisStepsPerMM for faster computation.

Inverse of axisStepsPerMM for faster conversion.

◆ lastCmdPos

float Printer::lastCmdPos
static

Last coordinates (global coordinates) send by g-codes.

◆ lastTempReport

millis_t Printer::lastTempReport = 0
static

◆ levelingP1

int32_t Printer::levelingP1[3]
static

◆ levelingP2

int32_t Printer::levelingP2[3]
static

◆ levelingP3

int32_t Printer::levelingP3[3]
static

◆ maxAccelerationMMPerSquareSecond

X, Y, Z and E max acceleration in mm/s^2 for printing moves or retracts.

◆ maxDeltaPositionSteps

int32_t Printer::maxDeltaPositionSteps
static

◆ maxExtruderSpeed

ufast8_t Printer::maxExtruderSpeed
static

Timer delay for end extruder speed.

◆ maxFeedrate

float Printer::maxFeedrate = {MAX_FEEDRATE_X, MAX_FEEDRATE_Y, MAX_FEEDRATE_Z}
static

Maximum feedrate in mm/s per axis.

Maximum allowed feedrate.

◆ maxInterval

uint32_t Printer::maxInterval
static

◆ maxJerk

float Printer::maxJerk
static

Maximum allowed jerk in mm/s.

◆ maxLayer

int Printer::maxLayer = -1
static

◆ maxPrintAccelerationStepsPerSquareSecond

unsigned long Printer::maxPrintAccelerationStepsPerSquareSecond
static

Acceleration in steps/s^3 in printing mode.

◆ maxTravelAccelerationMMPerSquareSecond

X, Y, Z max acceleration in mm/s^2 for travel moves.

◆ maxTravelAccelerationStepsPerSquareSecond

unsigned long Printer::maxTravelAccelerationStepsPerSquareSecond
static

Acceleration in steps/s^2 in movement mode.

◆ maxZJerk

float Printer::maxZJerk
static

Maximum allowed jerk in z direction in mm/s.

◆ memoryE

float Printer::memoryE = IGNORE_COORDINATE
static

◆ memoryF

float Printer::memoryF = -1
static

◆ memoryX

float Printer::memoryX = IGNORE_COORDINATE
static

◆ memoryY

float Printer::memoryY = IGNORE_COORDINATE
static

◆ memoryZ

float Printer::memoryZ = IGNORE_COORDINATE
static

◆ menuMode

uint16_t Printer::menuMode = 0
static

◆ mode

uint8_t Printer::mode = DEFAULT_PRINTER_MODE
static

◆ motorX

int8_t Printer::motorX
static

◆ motorYorZ

int8_t Printer::motorYorZ
static

◆ msecondsPrinting

uint32_t Printer::msecondsPrinting
static

Milliseconds of printing time (means time with heated extruder)

◆ multiZHomeFlags

fast8_t Printer::multiZHomeFlags
static

◆ offsetX

float Printer::offsetX
static

X-offset for different tool positions.

X-offset for different extruder positions.

◆ offsetY

float Printer::offsetY
static

Y-offset for different tool positions.

Y-offset for different extruder positions.

◆ offsetZ

float Printer::offsetZ
static

Z-offset for different tool positions.

Z-offset for different extruder positions.

◆ offsetZ2

float Printer::offsetZ2 = 0
static

Z-offset without rotation correction. Required for z probe corrections.

Z-offset without rotation correction.

◆ printMovesPerSecond

int16_t Printer::printMovesPerSecond
static

◆ printName

char Printer::printName = ""
static

◆ progress

float Printer::progress = 0
static

◆ radius0

float Printer::radius0
static

◆ realDeltaPositionSteps

int32_t Printer::realDeltaPositionSteps[TOWER_ARRAY]
static

◆ relativeCoordinateMode

uint8_t Printer::relativeCoordinateMode = false
static

Determines absolute (false) or relative Coordinates (true).

◆ relativeExtruderCoordinateMode

uint8_t Printer::relativeExtruderCoordinateMode = false
static

Determines Absolute or Relative E Codes while in Absolute Coordinates mode. E is always relative in Relative Coordinates mode.

◆ sledParked

bool Printer::sledParked
static

◆ stepNumber

uint32_t Printer::stepNumber
static

Step number in current move.

◆ stepsPerTimerCall

fast8_t Printer::stepsPerTimerCall = 1
static

◆ stepsRemainingAtXHit

int32_t Printer::stepsRemainingAtXHit
static

◆ stepsRemainingAtYHit

int32_t Printer::stepsRemainingAtYHit
static

◆ stepsRemainingAtZHit

int32_t Printer::stepsRemainingAtZHit
static

◆ thermoMaxTemp

float Printer::thermoMaxTemp
static

◆ thermoMinTemp

float Printer::thermoMinTemp
static

◆ timer

uint32_t Printer::timer
static

used for acceleration/deceleration timing

◆ travelMovesPerSecond

int16_t Printer::travelMovesPerSecond
static

◆ unitIsInches

uint8_t Printer::unitIsInches = 0
static

0 = Units are mm, 1 = units are inches.

◆ vMaxReached

speed_t Printer::vMaxReached
static

Maximum reached speed.

◆ wizardStack

wizardVar Printer::wizardStack
static

◆ wizardStackPos

fast8_t Printer::wizardStackPos
static

◆ xLength

float Printer::xLength
static

◆ xMaxSteps

int32_t Printer::xMaxSteps
static

For software endstops, limit of move in positive direction.

◆ xMaxStepsAdj

int32_t Printer::xMaxStepsAdj
static

◆ xMin

float Printer::xMin
static

◆ xMinSteps

int32_t Printer::xMinSteps
static

For software endstops, limit of move in negative direction.

◆ xMinStepsAdj

int32_t Printer::xMinStepsAdj
static

◆ yLength

float Printer::yLength
static

◆ yMaxSteps

int32_t Printer::yMaxSteps
static

For software endstops, limit of move in positive direction.

◆ yMaxStepsAdj

int32_t Printer::yMaxStepsAdj
static

◆ yMin

float Printer::yMin
static

◆ yMinSteps

int32_t Printer::yMinSteps
static

For software endstops, limit of move in negative direction.

◆ yMinStepsAdj

int32_t Printer::yMinStepsAdj
static

◆ zBabysteps

int16_t Printer::zBabysteps
static

◆ zBabystepsMissing

int16_t Printer::zBabystepsMissing
static

◆ zBedOffset

float Printer::zBedOffset = HAL::eprGetFloat(EPR_Z_PROBE_Z_OFFSET)
static

◆ zCorrectionStepsIncluded

int32_t Printer::zCorrectionStepsIncluded = 0
static

◆ zLength

float Printer::zLength
static

◆ zMaxSteps

int32_t Printer::zMaxSteps
static

For software endstops, limit of move in positive direction.

◆ zMaxStepsAdj

int32_t Printer::zMaxStepsAdj
static

◆ zMin

float Printer::zMin
static

◆ zMinSteps

int32_t Printer::zMinSteps
static

For software endstops, limit of move in negative direction.

◆ zMinStepsAdj

int32_t Printer::zMinStepsAdj
static

The documentation for this class was generated from the following files: